﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
 
using System.IO;
 

namespace YWJiXiao.App.WebForm.AdminManage.Pages
{
    public partial class mailZongjian : System.Web.UI.Page
    {
        
        protected void Page_Load(object sender, EventArgs e)
        {
            
            
        }

        /// <summary>
        /// 初始化事件
        /// </summary>
        public void initEvent()
        {
            this.btnSaveTemp.Click += new EventHandler(btnSaveTemp_Click);
            this.btnSendEmail.Click += new EventHandler(btnSendEmail_Click);
        }

        /// <summary>
        /// 保存模板
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void btnSaveTemp_Click(object sender, EventArgs e)
        {
            string emailTemplateV = this.textEamilTemplate.InnerText;
            string path = AppDomain.CurrentDomain.BaseDirectory + "template/CompleteEvalNoticeZongjian.htm";

            StreamWriter sw = new StreamWriter(path, false, System.Text.Encoding.UTF8);
            sw.WriteLine(emailTemplateV);
            sw.Close();
            this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(), "", "<script>layer.msg('模板保存成功');</script>", false);
        }

        /// <summary>
        /// 发送邮件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void btnSendEmail_Click(object sender, EventArgs e)
        {
            
          
        }
    }
}